﻿Imports System
Imports System.IO
Imports System.Runtime.Serialization
Imports System.Runtime.Serialization.Formatters.Binary
''' <summary>
''' 污染物名称和对应的背景浓度
''' </summary>
''' <remarks></remarks>
<Serializable()> Public Class NameAndBackCon
    Implements ICloneable
    Private m_Name As String '污染物的名称
    Private m_HourCon(-1) As Double  '
    Private m_DayCon(-1) As Double  '
    Private m_YearCon As Double = -1 '年平均

    Private m_AervageHourCon As Double
    Private m_AervageDayCon As Double
    Private m_AervageYearCon As Double


    ''' <summary>
    ''' 污染物名称
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Name() As String
        Get
            Return Me.m_Name
        End Get
        Set(ByVal value As String)
            Me.m_Name = value
        End Set
    End Property
    ''' <summary>
    ''' 小时平均数组
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property HourCon() As Double()  '
        Get
            Return m_HourCon
        End Get
        Set(ByVal value As Double())
            m_HourCon = value
        End Set
    End Property

    ''' <summary>
    ''' 日平均数组
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property DayCon() As Double()  '
        Get
            Return m_DayCon
        End Get
        Set(ByVal value As Double())
            m_DayCon = value
        End Set
    End Property
    ''' <summary>
    ''' 年平均
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property YearCon() As Double '年平均
        Get
            Return m_YearCon
        End Get
        Set(ByVal value As Double)
            m_YearCon = value
        End Set
    End Property
    ''' <summary>
    '''  所有监测点的小时平均浓度
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property AervageHourCon() As Double
        Get
            Return m_AervageHourCon
        End Get
        Set(ByVal value As Double)
            m_AervageHourCon = value
        End Set
    End Property
    ''' <summary>
    '''  所有监测点的日平均浓度
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property AervageDayCon() As Double
        Get
            Return m_AervageDayCon
        End Get
        Set(ByVal value As Double)
            m_AervageDayCon = value
        End Set
    End Property
    ''' <summary>
    ''' 所有监测点的年平均浓度
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property AervageYearCon() As Double
        Get
            Return m_AervageYearCon
        End Get
        Set(ByVal value As Double)
            m_AervageYearCon = value
        End Set
    End Property
    Public Function Clone() As Object Implements System.ICloneable.Clone
        Dim obj As New NameAndBackCon
        obj.Name = Me.Name
        ReDim obj.m_HourCon(Me.m_HourCon.Length - 1)
        For i As Integer = 0 To obj.m_HourCon.Length - 1
            obj.m_HourCon(i) = Me.m_HourCon(i)
        Next
        ReDim obj.m_DayCon(Me.m_DayCon.Length - 1)
        For i As Integer = 0 To obj.m_DayCon.Length - 1
            obj.m_DayCon(i) = Me.m_DayCon(i)
        Next

        obj.m_YearCon = Me.m_YearCon
        obj.m_AervageHourCon = Me.m_AervageHourCon
        obj.m_AervageDayCon = Me.m_AervageDayCon
        obj.m_AervageYearCon = Me.m_AervageYearCon
        Return obj
    End Function
End Class
